package com.cn.demo.springboot.shiro.entity;

import java.io.Serializable;

/**
 * 权限
 * @author admin
 *
 */
public class Permission implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 6482501775713905620L;
	
	private String permissionId;
	private String permissionName;
	private String permissionCode;
	private String menuCode;
	public String getPermissionId() {
		return permissionId;
	}
	public void setPermissionId(String permissionId) {
		this.permissionId = permissionId;
	}
	public String getPermissionName() {
		return permissionName;
	}
	public void setPermissionName(String permissionName) {
		this.permissionName = permissionName;
	}
	public String getPermissionCode() {
		return permissionCode;
	}
	public void setPermissionCode(String permissionCode) {
		this.permissionCode = permissionCode;
	}
	@Override
	public String toString() {
		return "Permission [permissionId=" + permissionId + ", permissionName=" + permissionName + ", permissionCode="
				+ permissionCode + ", menuCode=" + menuCode + "]";
	}

	public Permission() {
		super();
	}
	public String getMenuCode() {
		return menuCode;
	}
	public void setMenuCode(String menuCode) {
		this.menuCode = menuCode;
	} 
	
	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Permission) {
			Permission anObject = (Permission) obj;
			if (this.menuCode.equals(anObject.getMenuCode()) 
				&& this.permissionCode.equals(anObject.getPermissionCode())
				&& this.permissionName.equals(anObject.getPermissionName())) {
					return true;
			}else {
					return false;
			}
		}

		return super.equals(obj);
	}
	
/*	
	private String permissionId;
	private String permissionName;
	private String permissionUrl;
	private String parentPermissionId;
	private  Integer levle;
	
	public String getPermissionId() {
		return permissionId;
	}
	public void setPermissionId(String permissionId) {
		this.permissionId = permissionId;
	}
	public String getPermissionName() {
		return permissionName;
	}
	public void setPermissionName(String permissionName) {
		this.permissionName = permissionName;
	}
	public String getPermissionUrl() {
		return permissionUrl;
	}
	public void setPermissionUrl(String permissionUrl) {
		this.permissionUrl = permissionUrl;
	}
	public String getParentPermissionId() {
		return parentPermissionId;
	}
	public void setParentPermissionId(String parentPermissionId) {
		this.parentPermissionId = parentPermissionId;
	}
	public Integer getLevle() {
		return levle;
	}
	public void setLevle(Integer levle) {
		this.levle = levle;
	}*/

}
